package com.bwda.dsrs.filecenter.service.impl;


import com.bwda.dsrs.filecenter.domain.BusinessConstants;
import com.bwda.dsrs.filecenter.domain.po.sensitivewords.SensitiveWordsPo;
import com.bwda.dsrs.filecenter.domain.condition.sensitivewords.SensitiveWordsCondition;
import com.bwda.dsrs.filecenter.mapper.dsrs.SensitiveWordsMapper;
import com.bwda.dsrs.filecenter.service.SensitiveWordsService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 业务配置--敏感字段--服务层实现类
 *
 * @author zhangyinmei
 * @date 2019年4月28日
 */
@Service
public class SensitiveWordsServiceImpl extends BaseServiceImpl<SensitiveWordsPo, SensitiveWordsCondition, SensitiveWordsMapper> implements SensitiveWordsService {

	@Override
	public void batchDelete(List<Integer> idList) {
		//逻辑删除，故更新为已删除即可。
		SensitiveWordsPo po = new SensitiveWordsPo();
		//设置是否删除状态为已删除。
		po.setDelFlag(BusinessConstants.DelFlag.DELETED);
		//设置更新时间
		po.setUpdateTime(new Date());
		po.setIdList(idList);
		this.getMapper().update(po);
	}
}